package com.qkbb.admin.kuibu.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;

import com.qkbb.admin.kuibu.R;

/**
 * Created by admin on 2016/1/25.
 */
public class Pager_list_adapter extends BaseAdapter {
    Context context;
    public Pager_list_adapter(Context context){
        this.context=context;
    }
    int image[]=new int[]{R.drawable.shouye1,R.drawable.shouye2,R.drawable.shouye3,R.drawable.shouye4};
    @Override
    public int getCount() {
        return 4;
    }

    @Override
    public Object getItem(int position) {
        return position;
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        View view= LayoutInflater.from(context).inflate(R.layout.viewpager_listvie_item,null);
        ImageView imageView= (ImageView) view.findViewById(R.id.listview_item_image);
        imageView.setImageResource(image[position]);

        return view;
    }
}
